colors
Inside GraphicsDesigner, background and drawing colors are held as four USHORT values, one
each for red,green,blue intensity RGB, plus one for a standard color number.
Programs can specify colors as:
separate 16-bit values for (red,green,blue)
32-bit value containing 8-bit values for (red,green,blue,color)
standard colorNumber between 0 and 124
RGB colors
16-bit per color RGB easily represents every displayable and printable color. Over
48 trillion different colors can be specified in this RGB format. Human beings can
distinguish only about 48 million colors.
Colors that are not red, green, or blue are created by combinations of red, green, blue intensities. The following table shows how a number of colors are often synthesized (values in hex):
color R-16
G-16 B-16 R-8 G-8 B-8 color#
$$Black 0000 0000 0000
00 00 00 00
$$DarkGrey 4000 4000 4000 40
40 40 1F
$$MediumGrey 8000 8000 8000 80
80 80 3E
$$LightGrey C000 C000 C000 C0
C0 C0 5D
$$White FFFF FFFF FFFF
FF FF FF 7C
$$DarkRed 4000 0000 0000
40 00 00 19
$$MediumRed 8000 0000 0000 80
00 00 32
$$BrightRed C000 0000 0000 C0
00 00 4B
$$LightRed FFFF 0000 0000 FF
00 00 64
$$LightGreen 0000 FFFF 0000 00
FF 00 14
$$LightBlue 0000 0000 FFFF 00
00 FF 04
$$LightCyan 0000 FFFF FFFF 00
FF FF 18
$$LightYellow FFFF FFFF 0000 FF FF
00 78
$$LightMagenta FFFF 0000 FFFF FF 00
FF 3C
$$MediumAqua 4000 C000 8000 40
C0 80 2A
$$DarkBrown 4000 4000 0000 40
40 00 1E
The number of colors a computer can display at one time varies considerably from system to system. Some represent each primary color with an 8-bit intensity value, for 16 million simultaneously displayable colors. Others display only 256 different colors at one time, though each color can be any of these 16 million colors.
The colors actually displayed by GraphicsDesigner are as close to the specified colors as possible, given the state of computer system. No matter what system applications run on, they function identically, and graphics will appear as similar to the original results as practical.